<?php
header('content-type:text/html;charset=utf-8');
define('HOST', 'localhost');
define('USERNAME', 'root');
define('PASSWORD', '');
define('DATABASE', 'centraldong');
$conn = new mysqli(HOST, USERNAME, PASSWORD, DATABASE);
if ($conn->connect_error) {
    echo ('数据库连接失败' . $conn->connect_error);
}
$conn->query('SET NAMES UTF8'); //执行括号里面的语句